package com.facishare.open.demo;

import com.facishare.open.demo.ioc.HelloWorld;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * demo main 执行.
 * Created by zenglb on 2016/7/19.
 */
@Slf4j
public class IOCMainRunner {

    public static void main(String[] args) {
        BeanFactory factory =  new ClassPathXmlApplicationContext("classpath:spring/spring-common.xml");
        HelloWorld helloWorld = (HelloWorld) factory.getBean("helloWorld");
        log.info("=====================================");
        helloWorld.say("lambo.");
        log.info("=====================================");
    }
}
